package com.ruoyi.system.domain;

import com.alibaba.fastjson2.JSONObject;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商家商品分类对象 company_categroy
 * 
 * @author ruoyi
 * @date 2025-08-20
 */
public class CompanyCategroy extends BaseEntity
{

    /**
     * 转JSON
     * @return
     */
    public JSONObject toJSONObject() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id", this.getId());
        jsonObject.put("name", this.getName());
        jsonObject.put("level", this.getLevel());
        jsonObject.put("fid", this.getFid());
        jsonObject.put("sort", this.getSort());
        jsonObject.put("companyId", this.getCompanyId());
        return jsonObject;
    }

    private static final long serialVersionUID = 1L;

    /** id */
    private String id;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String name;

    /** 级别 */
    @Excel(name = "级别")
    private Integer level;

    /** 父级ID */
    @Excel(name = "父级ID")
    private String fid;

    /** 排序 */
    @Excel(name = "排序")
    private Double sort;

    /** 公司ID */
    @Excel(name = "公司ID")
    private Long companyId;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setLevel(Integer level) 
    {
        this.level = level;
    }

    public Integer getLevel() 
    {
        return level;
    }

    public void setFid(String fid) 
    {
        this.fid = fid;
    }

    public String getFid() 
    {
        return fid;
    }

    public void setSort(Double sort) 
    {
        this.sort = sort;
    }

    public Double getSort() 
    {
        return sort;
    }

    public void setCompanyId(Long companyId) 
    {
        this.companyId = companyId;
    }

    public Long getCompanyId() 
    {
        return companyId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("level", getLevel())
            .append("fid", getFid())
            .append("sort", getSort())
            .append("companyId", getCompanyId())
            .toString();
    }
}
